import App from "../../App";
import { Protocol, ProtoVo } from "../../../common/protocol/Protocol";

/** 控制基类 */
export default class BaseCtrl {

    get isLocal() { return App.isLocal }

    /** 发送协议 */
    send<Protocol extends keyof ProtoVo.Def>(protocol: Protocol, data?: ProtoVo.Def[Protocol]) {
        App.conn.send(protocol, data)
    }

}